package apis.amapv2.com.window;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;

import apis.amapv2.com.listviewlibrary.bean.ItemObject;
import apis.amapv2.com.listviewlibrary.view.MyListView;

public class MainActivity extends AppCompatActivity {

    private MyListView mLv;
    private ArrayList<ItemObject> mData = new ArrayList<>();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        initParamsAndValues();
        initView();
    }

    private void initParamsAndValues() {
        mData.add(new ItemObject("添加Window到屏幕上",Test2Activity.class));
        mData.add(new ItemObject("requestWindowFeature方法介绍", RequestWindowFeatureActivity.class));
        mData.add(new ItemObject("getWindow().setFlags();效果", SetFlagActivity.class));
    }

    private void initView() {
        mLv = findViewById(R.id.lv);
        mLv.setData(mData);
    }
}
